1. Field of the Invention
The invention relates to web-based communication systems. More particularly, the invention relates to cache systems for use in web-based communication systems.
2. Description of the Background Art
The use of the Internet and other web-based communication systems is expanding at an exponential rate. The Internet is organized as a series of client devices (usually computers or microprocessor-based devices) containing a web browser that requests and obtains web objects stored in remote server devices. Requests for information include a uniform resource locator (URL) such as www.YYY.com/Z where www.YYY.com is the address of a specific server device and xe2x80x9cZxe2x80x9d is a web object within that specific server device. To supply a web object to a client device, a request (including the URL) first has to travel from the client device to the server device, the server device has to access the web object, and then the web object must travel from the server device to the client device. This round-trip travel may consume considerable time especially if the server device is located far from the client device, or if the network is transferring data slowly.
One solution for improving web based communication throughput involves the use of a caching device. The caching device stores web objects that can be accessed by requests from client devices without requesting the object from a remotely located server. Due to the proximity of the caching device to the client device and the speed of the caching device, the time for requests containing URLS to be fulfilled may be decreased compared with fulfilling the same object directly from the server device. Cache memory is typically either located in the main memory or the disk memory of the caching device. Since disk memory (in disk drives) typically has considerably more storage space for data than main memory, most web objects stored in caching devices are stored in the disk memory. A caching device generally responds more quickly to requests if it is located quite close to the client device (both of which may be located thousands of miles from the server device). In these cases, the caching device will be able to respond to most requests from the client device sooner than the server device.
Certain Internet caching devices treat web objects as a file, and permit the file system of the caching device to manage the storage and retrieval of the web objects. There are, however, at least two disadvantages to this technique. First, file access requires at least one open, read, write, or close operation corresponding to the directories that contain the file. Such operations are time consuming. For example, a typical 400 MHz PENTIUM(copyright) (PENTIUM is a trademark of the Intel Corporation) system using a typical browser in which a file system is used to access web objects, an open( ) operation requires anywhere from 0.1 ms to 0.3 ms; a read( ) operation requires from 0.03 ms to 1 ms; a write( ) operation requires from 0.12 ms to 0.1 ms; and a close operations requires from 0.01 ms to 0.3 ms. Assuming multiple open( ), read( ), and close( ) calls for a multi-level directory and the files associated with each of the web objects, a file access can require as much as 2 ms. This time span to respond to a request reduces the number of disk requests that can be accommodated by a caching device.
Second, present file systems typically support many layers of directories and files. Names of web objects can expand to 256 characters in length. Meta-information is a data structure stored in main memory 126 that stores the memory locations of where the cached web objects are started within the caching device. Therefore, if there are a million files stored in a caching device, the meta-information associated with storing the names of the web objects can be as large as 250 Mbytes. Since the amount of meta-information is too large to all be stored in the main memory simultaneously, a large number of memory swap operations become necessary to switch the requested files associated with meta-information name files into the memory location where the meta-information can be accessed. Memory swap operations are time consuming and further limit the number of requests that can be handled by the caching device. Response rate (number of URLs per second) is a measure of performance of a server. Providing a high response rate requires access of a large number of memory swap operations, since each URL is typically requesting a web object stored in the memory.
Overall, while the multi-level directory structure is flexible in terms of creating a dynamic structure for retrieval of the web objects in caching devices, it does create a time-consuming overhead for caching devices to respond through the layers of the directories and in file name matching in providing a cached web object when a request is received.
It is desired to provide a caching device comprising a disk cache that stores web objects. Each web object stored in disk cache is stored in contiguous storage space locations in the disk cache. Each pair of temporally successive web objects stored in the disk cache are stored in substantially sequential storage space locations in the disk cache.
One aspect of the caching device includes a shared-memory cache that stores web objects and a main memory cache that stores web objects. The web objects stored in cache memory are first written into main memory cache. When the main memory cache becomes filled, at least some of the web objects stored in the main memory cache are written into shared-memory cache. When the shared-memory cache becomes filled, at least some of the web objects stored in the shared-memory cache are written into disk cache.
Another aspect of the caching device provides for storing web objects in the disk memory without using a file system. Providing for a cache device that stores web objects in substantially sequential storage space locations in the disk cache, and does not use a file system with the accompanying overhead, enhances the rate at which the web objects can be retrieved from the disk cache.